package com.tuanzi.controller.admin;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

/**
 * @author tuanzi
 * @version 1.0
 * @date 2022/3/30 19:26
 */


@RestController
@RequestMapping("/admin")
public class LogoutController {

    @RequestMapping("/logout")
    public void logout(HttpSession session){
        System.out.println(session.getAttribute("user"));
        session.removeAttribute("user");
    }

}
